package com.sky.controller.admin;

import com.sky.dto.SetmealDTO;
import com.sky.dto.SetmealPageQueryDTO;
import com.sky.result.Result;;
import com.sky.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/setmeal")
public class SetmealController {

@Autowired
private SetmealService setmealService;

    /**
     * 套餐新增
     * @param setmealDTO
     * @return
     */
    @PostMapping
    public Result setSetmeal(@RequestBody SetmealDTO setmealDTO){
        return setmealService.setSetmeal(setmealDTO);
    }



    /**
     * 套餐分页查询
     * @return
     */
    @GetMapping("/page")
    public Result setmealPage(SetmealPageQueryDTO dto){
        return setmealService.setmealPage(dto);
    }
}
